<?php
defined('_JEXEC') or die;
if (isDevMode()) {
   OCP\Util::addStyle('calendar', 'calendar');
   OCP\Util::addScript('calendar', 'calendar.list');
   OCP\Util::addStyle('calendar', 'calendar.common');
} else {
   OCP\Util::addStyle('static', 'calendar.list');
   OCP\Util::addScript('static', 'apps/calendar.list.min');
}
$feedbackinformation = $_['feedbackinformation'];
OCP\App::setActiveNavigationEntry('calendar_index');
?>
<div class="container inner_wrap">
      <div class="container" id="will_fixed">
         <div class="row-fluid">
            <div class="span12">
               <div class="company_qes_fixed  large songti">面试反馈表</div>
            </div>
         </div>
      </div>
      <?php if(!empty($feedbackinformation)): ?>
      <?php
      if(!empty($feedbackinformation['checkpoints'])){
         $checkpoints =  get_object_vars(json_decode($feedbackinformation['checkpoints']));
      }
      ?>
      <div class="row-fluid hr_oneconn_margin">
         <div class="span12 oneconn_box">
            <div class="feedbackform">
               <ul class="feedbackform_name clearfix">
                  <li><b>应<i></i>聘<i></i>者：</b><a href="<?php echo $_['viewURL']; ?>" target="_blank"><?=$feedbackinformation['jobseekername'] ?></a></li>
                  <li><b style="padding-left:10px;">应聘职位：</b><a href="<?php echo $_['jobposURL'].$feedbackinformation['jobid'].'&job_title='.JFilterOutput::stringURLUnicodeSlug($feedbackinformation['job_title']); ?>" target="_blank"><?=strmaxwordlen($feedbackinformation['job_title'],22);?></a></li>
                  <li><b>面试时间：</b><span><?php echo JHtml::_('date',$feedbackinformation['startdate']) ?></span></li>
                  <li><b style="width:90px;"><em class="redstar">*</em> 面<i></i>试<i></i>官：</b><span><?=strmaxwordlen($feedbackinformation['interviewer'],22); ?> (<?=strmaxwordlen($feedbackinformation['uid'],15) ?>)</span></li>
               </ul>

               <?php if(!empty($_["absent"])) { ?>
               <div class="jos_isabsent"><b>应聘者是否缺席：是</b></div>
               <?php }elseif(empty($_["absent"]) && empty($_['notattended'])){ ?>
               <div class="jos_isabsent"><b>应聘者是否缺席：否</b></div>
               <?php } else { ?>
               <div class="jos_isabsent"><b>未参加面试</b></div>
               <?php } ?>

               <?php if(!$_['absent'] && !$_['notattended']) { ?>
               <div class="feedbackform_comdiv clearfix">
                  <b><em class="redstar">*</em> 建议：</b>
                  <?php if(!empty($_['feedbacksuggestion'])): ?>
                  <?php foreach ($_['feedbacksuggestion'] as $key=>$feedbacksuggestion): ?>
                     <?php
                        if(isset($feedbackinformation['suggestion_id']) && $feedbackinformation['suggestion_id'] == $key+1) {
                           echo '<label class="radio inline" style="padding-left:0px;">'.$feedbacksuggestion['suggestion'].'</label>';
                        }
                     ?>
                  <?php endforeach; ?>
                  <?php endif; ?>
                </div>

               <div class="feedbackform_comdiv clearfix">
                  <b><em class="redstar">*</em> 评语：</b>
                  <div class="feedback_textpj"><?php if(isset($feedbackinformation['comment'])) echo $feedbackinformation['comment'] ?></div>
               </div>

               <div class="feedbackform_table">
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                     <tr>
                        <th width="24%" align="left";>评分项</th>
                        <th width="19%">优</th>
                        <th width="19%">良</th>
                        <th width="19%">中</th>
                        <th width="19%">差</th>
                     </tr>
                     <?php if(!empty($_['questionlist'])): ?>
                     <?php foreach ($_['questionlist'] as $key=>$questionlist):?>
                     <tr>
                        <td><?=$questionlist['question'] ?></td>
                        <td><?php echo (isset($checkpoints[$key+1]) && $checkpoints[$key+1] == 4)?'<i class="selected_result"></i>':''; ?></td>
                        <td><?php echo (isset($checkpoints[$key+1]) && $checkpoints[$key+1] == 3)?'<i class="selected_result"></i>':''; ?></td>
                        <td><?php echo (isset($checkpoints[$key+1]) && $checkpoints[$key+1] == 2)?'<i class="selected_result"></i>':''; ?></td>
                        <td><?php echo (isset($checkpoints[$key+1]) && $checkpoints[$key+1] == 1)?'<i class="selected_result"></i>':''; ?></td>
                     </tr>
                     <?php endforeach; ?>
                     <?php endif ?>
                  </table>
               </div>
               <?php }?>
            </div>
         </div>
      </div>
     <?php endif; ?>
   </div>

